#ifndef TWN_OBJMOVER_H
#define TWN_OBJMOVER_H	1

#ifdef ALONE_TWN_OBJMOVER

#include <stdio.h>
#include <math.h>
#include <process.h> 
#include "sysprm.h"
#include "ApmsApi.h"
#include "ApmsType.h"
#include "ApmsSecurity.h"
#include "Tianwan.h"
#include "Uti_Tianwan.h"
#include "Mov_Tianwan.h"
#include "Twn_Exec_N_Mov.h"


#define API_OBJM extern "C" __declspec(dllexport)
#else
#define API_OBJM extern "C" __declspec(dllimport)
#endif

typedef struct{
	int			vx;
	int			vy;
	int			cellType;
	float		tdPos;
	OBJTCELL	objtCell;
	OBJTMM		objtMM;
}CLGR_INFO;

typedef struct{
	int			vx;
	int			vy;
	int			msgType;
}CLGR_MSG;

API_OBJM BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved );
API_OBJM RETSTAT ObjectMover(HWND hWnd);
API_OBJM RETSTAT SetToMove(OBJTMM objtMM);
API_OBJM RETSTAT SetWeightOnMast(OBJTMM objtMM);
int OBM_LogFileWrite(int cmd, TCHAR *Comment, int errNum);

void clgrMsg(LPVOID param);
void SendClgrMsg(int vx, int vy, int type);
RETSTAT boolTag(TAGIDX tagIdx, bool *tag);
RETSTAT StopMovement(void);
#endif
